package test

import (
	"codejy/store"
	"codejy/structdef"
)

type TypeInstance struct {
	Addr        string
	ThreadStore *structdef.ThreadStore
	Str         string
}

// 创建实例
func (a *TypeInstance) CreateTypeDefault(addr string, threadStore *structdef.ThreadStore, parameter ...string) {
	instance := &TypeInstance{
		Addr:        addr,
		ThreadStore: threadStore,
		Str:         "",
	}
	store.AddTypeDefaultInstanceStore(threadStore, a.GetTypeName(), addr, instance)
}
func (a *TypeInstance) ParameterProcessing(parameter []string) []string {
	return parameter
}

func (a *TypeInstance) GetData() interface{} {
	return a.Str
}

func (a *TypeInstance) ToStr() string {
	return ""
}

func (f *TypeInstance) GetDef() string {
	return `
		type Instance{
			def init{
				core&CreateTypeDefault()
			}
		
		}
	`
}
func init() {
	//RegisterTypeDefault(&TypeInstance{})
}

func (f *TypeInstance) GetTypeName() string {
	return "Instance"
}
